Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.sw
Class ClassInstance

    java.lang.Object
      rdlc.naming.Catalog<java.lang.String,V>
          rdlc.naming.HierarchicalCatalog<Field>
              rdlc.rdl.Instance
                  rdlc.sw.Instance_Base
                      rdlc.sw.ClassInstance

All Implemented Interfaces:
  Expression, Field

    public class ClassInstance

extends Instance_Base

This is a specialization of `Instance_Base` meant to handle class members. It includes code to determine if it is indeed a class or an interface (pure virtual class), and whether it has any abstract (pure virtual) methods or not.

Version:
  $Revision: 1.15 $
Author:
  Greg Gibeling

Nested Class Summary

Nested classes/interfaces inherited from class rdlc.rdl.Instance
`Instance.Accessor, Instance.Identifier, Instance.LateBindField, Instance.QualifiedIdentifier`

Nested classes/interfaces inherited from class rdlc.naming.HierarchicalCatalog
`HierarchicalCatalog.DefaultAccessor<_V>`

Nested classes/interfaces inherited from interface rdlc.sw.Field
`Field.Access`

Nested classes/interfaces inherited from interface rdlc.rdl.Expression
`Expression.Phase`

Field Summary
`protected int` | `argCount` The current number of type arguments (template parameters) to this class.
`protected java.lang.Boolean` | `isAbstract` Is this class abstract (has pure virtual methods)? This may be `null` if the answer is unknown.
`protected java.lang.Boolean` | `isInterface` Is this class an interface (pure virtual class)? This may be `null` if the answer is unknown.

Fields inherited from class rdlc.sw.Instance_Base
`access`

Fields inherited from class rdlc.rdl.Instance
`bound, copied, copySource, dynRoot, lateBindFieldList, namespace, resolved`

Fields inherited from class rdlc.naming.HierarchicalCatalog
`cachedIdentifier, cachedRoot, name, parent`

Fields inherited from class rdlc.naming.Catalog
`entryList, indexTable`

Constructor Summary
`ClassInstance(java.lang.String _name, Class _class, Field.Access _access)` Default constructor, simply stores the given arguments and resulves the (non-existant) member fields.

Method Summary
`void` | `add(Field_Named _fieldNamed)` Add the given named field to this instance.
`void` | `add(Instance_Base _fieldInst)`
`Field` | `copy(java.lang.String _name, Instance _instance)` Create a copy of this field in the given instance.
`void` | `generateInheritedDefaults()` Generate the inherited abstract methods which must be implemented in order for this class to actually be instantiated.
`int` | `getTypeArgCount()` Simple accessor.
`boolean` | `isAbstract()` Determine if this class is abstract (has pure virtual methods).
`boolean` | `isInterface()` Determine if this class is an interface (pure virtual class).
`java.lang.String` | `toString()` Simple accessor.

Methods inherited from class rdlc.sw.Instance_Base
`getAccess`

Methods inherited from class rdlc.rdl.Instance
`add, bindFields, copySubInstance, createIdentifier, getDynRoot, getRequirements, resolve, setInstance, setNamespace, setRawDynamicID, typeMatch`

Methods inherited from class rdlc.naming.HierarchicalCatalog
`connectParent, getIdentifier, getName, getParent, getRoot, hashCode`

Methods inherited from class rdlc.naming.Catalog
`clear, containsKey, entryList, get, get, getKey, isEmpty, keySet, put, put, putAll, remove, size`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface rdlc.rdl.Field
`getIdentifier, setInstance, setRawDynamicID`

Methods inherited from interface rdlc.rdl.Expression
`getRequirements, resolve, setNamespace, typeMatch`

Field Detail

### isInterface

    protected java.lang.Boolean isInterface

  Is this class an interface (pure virtual class)? This may be `null` if the answer is unknown.

### isAbstract

    protected java.lang.Boolean isAbstract

  Is this class abstract (has pure virtual methods)? This may be `null` if the answer is unknown.

### argCount

    protected int argCount

  The current number of type arguments (template parameters) to this class.

Constructor Detail

### ClassInstance

    public ClassInstance(java.lang.String _name,
                         Class _class,
                         Field.Access _access)

  Default constructor, simply stores the given arguments and resulves the (non-existant) member fields.

  Parameters:
    `_name` - The name to use for this class instance
    `_class` - The class this instance represents.
    `_access` - The access level of the associated class.

Method Detail

### copy

    public Field copy(java.lang.String _name,
                      Instance _instance)

  Description copied from interface: `Field`
  Create a copy of this field in the given instance. This is highly useful during dynamic hierarchy copying and during back end generation.

  Parameters:
    `_name` - The new name to use.
    `_instance` - The instance the copy should be a member of.
  See Also:
    `Field.copy(String, Instance)`

### toString

    public java.lang.String toString()

  Simple accessor.

  Overrides:
    `toString` in class `Instance`
  Returns:
    A human readable representation of this wire for debugging.

### isInterface

    public boolean isInterface()

  Determine if this class is an interface (pure virtual class). This involves some serious data structure traversal and so the result is cached for future reference, and not computed until first needed.

  Returns:
    `true` if this class is actually an interface.

### isAbstract

    public boolean isAbstract()

  Determine if this class is abstract (has pure virtual methods). This involves some serious data structure traversal and so the result is cached for future reference, and not computed until first needed.

  Returns:
    `true` if this class has abstract (pure virtual) methods.

### add

    public void add(Field_Named _fieldNamed)

  Description copied from class: `Instance`
  Add the given named field to this instance. For an instance which has not been resolved this will add it to the late binding list for binding during `resolve()`. Whereas for an instance which has already been resolved this will add the field directly in. In both cases it will call `setInstance` as appropriate.

  Overrides:
    `add` in class `Instance`
  Parameters:
    `_fieldNamed` - The named field being added to this instance.
  See Also:
    `Instance.add(Field_Named)`

### getTypeArgCount

    public int getTypeArgCount()

  Simple accessor.

  Returns:
    The number of type arguments (template parameters) for this class.

### add

    public void add(Instance_Base _fieldInst)

  See Also:
    `Instance.add(Instance)`

### generateInheritedDefaults

    public void generateInheritedDefaults()

  Generate the inherited abstract methods which must be implemented in order for this class to actually be instantiated. This will also handle type variable (template argument) resolution through the inheritance hierarchy.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD